//
//  CarDetailsViewController.m
//  Manage
//
//  Created by 杨康 on 2017/11/14.
//  Copyright © 2017年 杨康. All rights reserved.
//

#import "CarDetailsViewController.h"

@interface CarDetailsViewController ()

@end

@implementation CarDetailsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"车辆详情";
    UIButton *leftButton=(UIButton *)self.navigationItem.leftBarButtonItem.customView;
    leftButton.selected=YES;
    
    
    
    
    UIView *infoView=[[UIView alloc]init];
    [self.view addSubview:infoView];
    [infoView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(0);
        make.top.mas_equalTo(TOP_HEIGHT);
        make.size.mas_equalTo(CGSizeMake(SCREEN_WIDTH, SCREEN_HEIGHT-TOP_HEIGHT));
    }];
    infoView.backgroundColor=[UIColor whiteColor];
    
    for (int i=0; i<3; i++) {
        UIImageView *carImg=[[UIImageView alloc]init];
        [infoView addSubview:carImg];
        [carImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.mas_equalTo(15+70*i);
            make.top.mas_equalTo(15);
            make.size.mas_equalTo(CGSizeMake(60, 60));
        }];
        carImg.backgroundColor=[UIColor colorE];
    }
    
    
    UILabel *stateLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"报失状态：%@",self.type] andFont:14.0];
    [infoView addSubview:stateLab];
    [stateLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(25+60);
    }];
    
    
    UILabel *nameLab=[SingLeton myLabel:[UIColor color6] andTitle:@"电动车名称：名称" andFont:14.0];
    [infoView addSubview:nameLab];
    [nameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(stateLab.mas_bottom).mas_offset(10);
    }];
    
    
    UILabel *licenceLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"车牌：%@",@"西湖区123456"] andFont:14.0];
    [infoView addSubview:licenceLab];
    [licenceLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(nameLab.mas_bottom).mas_offset(10);
    }];
    
    
    UILabel *brandLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"品牌：%@",@"心艺"] andFont:14.0];
    [infoView addSubview:brandLab];
    [brandLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(licenceLab.mas_bottom).mas_offset(10);
    }];
    
    UILabel *storeLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"购买店铺：%@",@"xxx心艺专卖店"] andFont:14.0];
    [infoView addSubview:storeLab];
    [storeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(brandLab.mas_bottom).mas_offset(10);
    }];
    
    UILabel *typeLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"型号：%@",@"xxx型号"] andFont:14.0];
    [infoView addSubview:typeLab];
    [typeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(storeLab.mas_bottom).mas_offset(10);
    }];
    
    UILabel *colorLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"颜色：%@",@"蓝色"] andFont:14.0];
    [infoView addSubview:colorLab];
    [colorLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(typeLab.mas_bottom).mas_offset(10);
    }];
    
    UILabel *frameLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"车架号：%@",@"78788"] andFont:14.0];
    [infoView addSubview:frameLab];
    [frameLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(colorLab.mas_bottom).mas_offset(10);
    }];
    
    
    UILabel *emNumLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"电机号：%@",@"83478555878"] andFont:14.0];
    [infoView addSubview:emNumLab];
    [emNumLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(frameLab.mas_bottom).mas_offset(10);
    }];
    
    
    UILabel *timeLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"报失时间：%@",@"2017-07-01 15:30:22"] andFont:14.0];
    [infoView addSubview:timeLab];
    [timeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(emNumLab.mas_bottom).mas_offset(10);
    }];
    
    UILabel *reportAddressLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"报失地址：%@",@"鼓楼区东街243号xx楼"] andFont:14.0];
    [infoView addSubview:reportAddressLab];
    [reportAddressLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(timeLab.mas_bottom).mas_offset(10);
    }];
    
    UILabel *lostAddressLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"丢失地址：%@",@"鼓楼区东街100号xx楼"] andFont:14.0];
    [infoView addSubview:lostAddressLab];
    [lostAddressLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(reportAddressLab.mas_bottom).mas_offset(10);
    }];
    
    UILabel *describeLab=[SingLeton myLabel:[UIColor color6] andTitle:[NSString stringWithFormat:@"描述：%@",@"此为描述丢失情况"] andFont:14.0];
    [infoView addSubview:describeLab];
    [describeLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(15);
        make.top.mas_equalTo(lostAddressLab.mas_bottom).mas_offset(10);
    }];
}



@end
